package csu.big_article.config;

import csu.big_article.interceptors.LoginInterceptor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

//指示一个类声明了一个或多个@Bean方法，并且可能会被Spring容器用来生成Bean定义和服务请求。
@Configuration
public class WebConfig implements WebMvcConfigurer {

//    @Autowired
//    public LoginInterceptor loginInterceptor;
//
//    @Override
//    public void addInterceptors(InterceptorRegistry registry) {
//        //注册拦截器 但是登陆注册接口不拦截
//        registry.addInterceptor(loginInterceptor)
//                .excludePathPatterns("/user/login","/user/register");
//    }
}
